<div id="left">
   <div class="nav" style="text-align:left; margin-bottom:15px;">
              当前位置:  <a href=<?php echo base_url("home/index");?>>Home</a>
   </div>

   <?php 
          foreach($articles as $row){
	     
          	echo '<div class="article"><div style="text-align:left;"><h2>'."\n";
	        echo '<a href='. base_url('home/show')."/".$row['id'].' alt=>'.$row['title']. '</a>'."\n";
	        echo '</h2>'."\n";
	        echo '</div>'."\n";
	        echo '<div class="des"> 发布日期:'. date('Y年m月d日',$row['created']).'&nbsp;  编辑:'.$row['own'].'<div style="float:right;"><img src='.base_url().'img/btn/icon_edit.gif />('.$row['visits'].')</div></div>'."\n";	            
	        echo '<div class="boxcontent">'."\n";
	        echo  $row['body'];
	        echo '</div>'."\n";
	        echo '<div style="height:40px; line-height:30px; text-align:left;">发表在 <a href='.base_url('home/category').'/'.$row['category'].' alt='.$row['category'].' style="color:#6666FF;">'.$row['category'].'</a>  标签:';
	        if(!empty($row['tags']))
	        {
	        	if(is_array($row['tags']))
	        	{
	        		foreach($row['tags'] as $tag)
	        		{
	        			echo '<a href="'.base_url('home/tag').'/'.$tag.'" style="color:#6666FF">'.$tag.'</a>';
	        		}
	        	}else{
	        		echo '<a href="'.base_url('home/tag').'/'.$row['tags'].'" style="color:#6666FF">'.$row['tags'].'</a>';
	        	}
	        }
	        echo '</div>';
            echo '</div>'."\n";
  
         } 
         ?>
   <hr>
   <div>
      <div style="float:left; line-height:20px;"><a style="display:block; margin-left:3px; line-height:20px; width:50px; height:20px; float:left; border:solid 1px #ccc;" href="#">PREV</a></div>
	 <?php for($i=1;$i<=$count_page;$i++)
		   {
					echo "   <a style='display:block; margin-left:3px; line-height:20px; width:20px; height:20px; float:left; border:solid 1px #ccc;' href=".$url."/".$i.">".$i."</a>";
			} 
	  ?>
	  <div style="float:left; line-height:20px;"><a style="display:block; margin-left:3px; line-height:20px; width:50px; height:20px; float:left; border:solid 1px #ccc;" href="#">NEXT</a></div>
	  
   </div>       
</div>
